<template>
  <el-drawer
    :modal="modal"
    :title="title"
    :visible.sync="display"
    :direction="direction"
    :size="width"
    :wrapperClosable="wrapperClosable"
  >
    <div>
      <div class="full_drw">
        <div class="attr_list">
          <div style="margin-right: 6px">流属性:</div>
          <div>{{ attrStr }}</div>
        </div>
        <el-input
          type="textarea"
          :rows="20"
          placeholder="请输入更改指令"
          v-model="attTextarea"
        >
        </el-input>
      </div>
      <TopOperationButton
        @submit="submitFull"
        @handClose="handClose"
        style="padding-right: 20px"
      />
    </div>
  </el-drawer>
</template>

<script>
import TopOperationButton from "../../CommonComponents/TopOperationButton";
export default {
  props: {
    wrapperClosable: {
      type: Boolean,
      default: false,
    },
    modal: {
      type: Boolean,
      default: false,
    },
    display: {
      type: Boolean,
      default: false,
    },
    direction: {
      type: String,
      default: "rtl",
    },
    width: {
      type: [String, Number],
      default: "500px",
    },
    title: {
      type: String,
      default: "标题",
    },
    defVal: {
      type: String,
      default: "",
    },
    attrStr: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      attTextarea: "",
      displayShow: "",
    };
  },
  components: {
    TopOperationButton,
  },
  methods: {
    handClose() {
      this.$emit("fullHandClose");
    },
    submitFull() {
      this.$emit("submitFull", this.attTextarea);
    },
  },
};
</script>

<style>
.full_drw {
  padding: 20px;
  border-top: 1px solid #e4e4e4;
  border-bottom: 1px solid #e4e4e4;
}
.attr_list {
  display: flex;
  flex-wrap: wrap;
  line-height: normal;
  margin-bottom: 10px;
  font-size: 13px;
  color: #666;
}
</style>